import React, { Component } from 'react';
import { Row, Col, } from 'antd';

import './CardNormal.less';

import Card from './Card';

export default class CardNormal extends Component {
  constructor(props) {
    super(props);
    this.state = {
      data:this.props.data
    };
  }

  render() {
    return (
        <div className="wrap-app">
          <Row className="row-product">
            <Col span={4}>
              <article>
                <div >
                  <p>{this.props.title}</p>
                </div>
              </article>
            </Col>{
            this.state.data.map(function (val,index) {
              return  <Col span={5} key={index}>
                        <Card icon={val.icon}
                              title={val.title}
                              company={val.company}
                              price={val.price}
                              before_price={val.before_price}
                              description={val.description}
                              isdiscount={val.isdiscount}
                              discount={val.discount}/>
                      </Col>
            })}
            <div className="pro_more">
              <div>
                <p>更多 &gt;</p>
              </div>
            </div>
          </Row>
        </div>
    );
  }
}